package org.uim.cricket.storage.deserialize.clean;

import org.uim.cricket.entities.batting.BatsmanStatistics;

public class NormalizeBattingStatistics {

	public void normalize(BatsmanStatistics batinn) {
		if (batinn == null) return;
		BatsmanStatistics stats = batinn;
		if (stats.getBalls() < 0) stats.setBalls(0);
		if (stats.getFours() < 0) stats.setFours(0);
		if (stats.getMins() < 0) stats.setMins(0);
		if (stats.getRuns() < 0) stats.setRuns(0);
		if (stats.getSixes() < 0) stats.setSixes(0);
	}
	
}
